        <div class="container">
        <div class="row">
                <div class="twelve columns">
                    <div class="box_c">
                        <div class="box_c_heading cf box_actions">
                            <p><?php echo $menu_item ?></p>
                        </div>
                        <div class="box_c_content">
                            <table class="display dt_act mobile_dt3" id="admin_ourworks">
                                <thead>
                                    <tr>
                                    <!--<th class="chb_col"><input type="checkbox" class="chSel_all" /></th>-->
                                        <?php 
										foreach ($fields as $field) {
											if ($field == 'description') {
											echo '<th width="40%">'.$field.'</th>';
											} elseif ($field == 'id' || $field == 'url') {
												continue;
											} else{
												echo '<th>'.$field.'</th>';
											}
										}
                                        ?>
                                    <th class="essential">Actions</th>
                                    </tr>
                                </thead>
                                <tbody>
                                <?php $i=0; ?>
                                	<?php foreach ($ourworks as $item): ?>
                                    <?php $i++; ?>
                                    <tr id="<?php echo $item['id']?>">
                                       <!--<td class="chb_col"><input type="checkbox" name="row_sel" />
                                        </td>-->
                                        
                                        <td><?php echo $item['item_name']?>
                                        </td>
                                        <td class="edit_td">
                                        <div id="<?=$item['id']?>" class="value"><div id="des_<?=$item['id']?>"><?php echo $item['description']?></div></div>
                                        <div id="<?=$item['id']?>" class="input" style="display:none"><textarea style="width:100%; height:200px" type="text" id="des_input_<?php echo $item['id'] ?>"><?php echo $item['description'] ?></textarea></div>
                                        </td>
                                        <td class="edit_td">
                                        <div id="<?=$item['id']?>" class="value">
                                        <img id="curImg_<?=$item['id']?>" width="280px" height="280px" src="<?=base_url($item['image_url'])?>"/></div>
                                        <div class="input" style="display:none" id="<?=$item['id']?>">
                                       <div id="UploadImages_<?=$item['id']?>" rid="<?=$item['id']?>" class="UploadImages">
                                            <noscript>Please enable javascript to upload and crop images.</noscript>
                                        </div>

                                        <div id="PhotoPrevs_<?=$item['id']?>" rid="<?=$item['id']?>" class="PhotoPrevs">
                                            <!-- The cropped images will be populated here -->
                                        </div>
                                       </div>
                                        </td>
                                        <td class="content_actions">
                                        <a id="<?php echo $item['id']?>" href="#" class="sepV_a edit_txt" title="Edit"><img src="<?=base_url()?>resources/admin/img/ico/pencil_gray.png" alt="" /></a>
                                        <a style="display:none" id="<?php echo $item['id']?>" href="#" class="sepV_a save_txt" title="Cancel"><img src="<?=base_url()?>resources/admin/img/ico/save.png" alt="" /></a>
                                        <a style="display:none" id="<?php echo $item['id']?>" href="#" class="sepV_a cancel_txt" title="Cancel"><img src="<?=base_url()?>resources/admin/img/ico/cancel_gray.png" alt="" /></a>
                                        <!--<a href="<?=base_url()?>" class="sepV_a" title="View"><img src="<?=base_url()?>resources/admin/img/ico/preview_gray.png" alt="" /></a>-->
                                        </td>
                                    </tr>
                                    <?php endforeach; ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript">
										//$(function() {
										$(document).ready(function() {
											$( ".UploadImages" ).each(function() {
												var id=$(this).attr('rid');
												$('#UploadImages_'+id).uberuploadcropper({
													//---------------------------------------------------
													// uploadify options..
													//---------------------------------------------------
													fineuploader: {
														//debug : true,
														request	: { 
															// params: {}
															endpoint: baseurl + 'upload/action' 
														},						
														validation: {
															sizeLimit	: 1024 * 1000, //in bytes
															allowedExtensions: ['jpg','jpeg','png','gif']
														}
													},
													//---------------------------------------------------
													//now the cropper options..
													//---------------------------------------------------
													jcrop: {
														aspectRatio  : 1, 
														allowSelect  : false, //can reselect
														allowResize  : true,  //can resize selection
														setSelect    : [ 0, 0, 200, 200 ], //these are the dimensions of the crop box x1,y1,x2,y2
														minSize      : [ 200, 200 ], //if you want to be able to resize, use these
														maxSize      : [ 380, 380 ]
													},
													//---------------------------------------------------
													//now the uber options..
													//---------------------------------------------------
													folder           : baseurl + 'resources/upload_imgs/', // only used in uber, not passed to server
													cropAction       : baseurl + 'crop/action', // server side request to crop image
													onComplete       : function(e,imgs,data){ 
														var $PhotoPrevs = $('#PhotoPrevs_'+id);
								
														for(var i=0,l=imgs.length; i<l; i++){
															$('.qq-upload-list').empty();
															$PhotoPrevs.html('<img width="280px" height="280px" src="<?=base_url()?>resources/upload_imgs/'+ imgs[i].filename +'?d='+ (new Date()).getTime() +'" />');
															$PhotoPrevs.append('<input id="newImg_'+id+'" type="hidden" name="newImg" value="resources/upload_imgs/'+ imgs[i].filename +'?d='+ (new Date()).getTime() +'" />');
														}
													}
												});
											//}
											});
											});
											/*$(document).ready(function() {
											for (var i = <?=$items[0]['id']?>; i <= <?=$i?>;i++){
												initCrop(i);
											}
											});*/
										</script>  
                                        <script src="<?=base_url()?>resources/admin/js/admin_ourwork_ajax.js"></script>